﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace LinqToAmazonSilverlightUI.DataTypesUI
{
    public class DTSearchCriteria
    {
        #region CONSTANTS
        public const int Nothing = 0;
        //SORT BY
        public const int Ascending = 1;
        public const int Descending = 2;
        public const int PubDate = 3;
        public const int Tit = 4;
        //CONDITION
        public const string New = "New";
        public const string Used = "Used";
        public const string Collectible = "Collectible";
        public const string Refurbished = "Refurbished";
        public const string All = "All";                
        #endregion

        #region FIELDS
        public bool IsAdvanced { get; set; }
        public string MainKeywords { get; set; }
        public SortCondition SortBy { get; set; }
        public string Author { get; set; }
        public string Publisher { get; set; }
        public string Title { get; set; }
        public int Category { get; set; }
        public string Condition { get; set; }
        public string Keywords { get; set; }
        public int MaxPrice { get; set; }
        public int MinPrice { get; set; }
        #endregion

        public DTSearchCriteria()
        {
            SortBy = new SortCondition(false);
            Author = "";
            Publisher = "";
            Title = "";
            Category = Nothing;
            Condition = DTSearchCriteria.New;
            Keywords = "";
            MaxPrice = 0;
            MinPrice = 0;
        }
    }

    public class SortCondition
    {
        public bool IsSortConditionSelected { get; set; }
        public bool IsSecondConditionSelected { get; set; }
        public bool IsThirdConditionSelected { get; set; }

        public int FirstSortCondition { get; set; }
        public int SecondSortCondition { get; set; }
        public int ThirdSortCondition { get; set; }

        public SortCondition(bool isSortSelected)
        {
            this.IsSortConditionSelected = isSortSelected;
        }
    }
}
